<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
 <meta>
  <!-- Stylesheets -->
  <link href="../web.css" type="text/css" rel="stylesheet"></link>
  <link href="../pygmentize.css" type="text/css" rel="stylesheet"></link>
  <title>VLFeat - Documentation - C API</title>
  <link rel="stylesheet" type="text/css" href="../doxygen.css"></style>

  <!-- Scripts-->
  
 </meta>

 <!-- Body Start -->
 <body>
  <div id="header">
   <!-- Google CSE Search Box Begins -->
   <form action="http://www.vlfeat.org/search.html" method="get" id="cse-search-box" enctype="application/x-www-form-urlencoded">
    <div>
     <input type="hidden" name="cx" value="003215582122030917471:oq23albfeam"></input>
     <input type="hidden" name="cof" value="FORID:11"></input>
     <input type="hidden" name="ie" value="UTF-8"></input>
     <input type="text" name="q" size="31"></input>
     <input type="submit" name="sa" value="Search"></input>
    </div>
   </form>
   <script src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en" xml:space="preserve" type="text/javascript"></script>
   <!-- Google CSE Search Box Ends -->
   <h1><a shape="rect" href="../index.html" class="plain"><span id="vlfeat">VLFeat</span><span id="dotorg">.org</span></a></h1>
  </div>
  <div id="headbanner">
   Documentation - C API
  </div>
  <div id="pagebody">
   <div id="sidebar"> <!-- Navigation Start -->
    <ul>
<li><a href="../index.html">Home</a>
</li>
<li><a href="../download.html">Download</a>
</li>
<li><a href="../doc.html">Documentation</a>
<ul>
<li><a href="../mdoc/mdoc.html">Matlab API</a>
</li>
<li><a href="index.html" class='active' >C API</a>
</li>
<li><a href="../man/man.html">Man pages</a>
</li>
</ul></li>
<li><a href="../overview/tut.html">Tutorials</a>
</li>
<li><a href="../applications/apps.html">Applications</a>
</li>
</ul>

   </div> <!-- sidebar -->
   <div id="content">
    
    <link rel="stylesheet" type="text/css" href="../doxygen.css"></style>
    <div class="doxygen">
<div>
<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a>  </div>
  <div class="headertitle">
<div class="title">sift.h File Reference</div>  </div>
</div>
<div class="contents">

<p>SIFT (<a class="el" href="sift.html">Scale Invariant Feature Transform (SIFT)</a>)  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="generic_8h.html">generic.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structVlSiftKeypoint.html">VlSiftKeypoint</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">SIFT filter keypoint.  <a href="structVlSiftKeypoint.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">SIFT filter.  <a href="structVlSiftFilt.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7efac4fb08e4642f12ef439ac376a5cc"></a><!-- doxytag: member="sift.h::vl_sift_pix" ref="a7efac4fb08e4642f12ef439ac376a5cc" args="" -->
typedef float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a7efac4fb08e4642f12ef439ac376a5cc">vl_sift_pix</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">SIFT filter pixel type. <br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Create and destroy</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#adff66a155e30ed412bc8bbb97dfa2fae">vl_sift_new</a> (int width, int height, int noctaves, int nlevels, int o_min)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new SIFT filter.  <a href="#adff66a155e30ed412bc8bbb97dfa2fae"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#ab242293326626641411e7d7f43a109b2">vl_sift_delete</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete SIFT filter.  <a href="#ab242293326626641411e7d7f43a109b2"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Process data</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a97cca9a09efaadc9dd0671912b9d5e05">vl_sift_process_first_octave</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *f, <a class="el" href="sift_8h.html#a7efac4fb08e4642f12ef439ac376a5cc">vl_sift_pix</a> const *im)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Start processing a new image.  <a href="#a97cca9a09efaadc9dd0671912b9d5e05"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a610cab1a3bf7d38e389afda9037f14da">vl_sift_process_next_octave</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Process next octave.  <a href="#a610cab1a3bf7d38e389afda9037f14da"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a65c55820964f4f6609ca9ef1d547b2c4">vl_sift_detect</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Detect keypoints.  <a href="#a65c55820964f4f6609ca9ef1d547b2c4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a2e409d464f81582dc3e839bf0fece66e">vl_sift_calc_keypoint_orientations</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *f, double angles[4], <a class="el" href="structVlSiftKeypoint.html">VlSiftKeypoint</a> const *k)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the keypoint orientation(s)  <a href="#a2e409d464f81582dc3e839bf0fece66e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a19140d86df12ff8c211c2728209de9b1">vl_sift_calc_keypoint_descriptor</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *f, <a class="el" href="sift_8h.html#a7efac4fb08e4642f12ef439ac376a5cc">vl_sift_pix</a> *descr, <a class="el" href="structVlSiftKeypoint.html">VlSiftKeypoint</a> const *k, double angle)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the descriptor of a keypoint.  <a href="#a19140d86df12ff8c211c2728209de9b1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a46d3e864618b4a940c2099b7c1f7b6a6">vl_sift_calc_raw_descriptor</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f, <a class="el" href="sift_8h.html#a7efac4fb08e4642f12ef439ac376a5cc">vl_sift_pix</a> const *image, <a class="el" href="sift_8h.html#a7efac4fb08e4642f12ef439ac376a5cc">vl_sift_pix</a> *descr, int widht, int height, double x, double y, double s, double angle0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Run the SIFT descriptor on raw data.  <a href="#a46d3e864618b4a940c2099b7c1f7b6a6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a6f3fc8e38b6c0c520cb90b1a63ddc031">vl_sift_keypoint_init</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f, <a class="el" href="structVlSiftKeypoint.html">VlSiftKeypoint</a> *k, double x, double y, double sigma)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a keypoint from its position and scale.  <a href="#a6f3fc8e38b6c0c520cb90b1a63ddc031"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Retrieve data and parameters</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a70186e579c8eff1bcabf408f46169cad">vl_sift_get_octave_index</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current octave index.  <a href="#a70186e579c8eff1bcabf408f46169cad"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a5e0cd96b3985635b82adabc3ce8b2242">vl_sift_get_noctaves</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get number of octaves.  <a href="#a5e0cd96b3985635b82adabc3ce8b2242"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#aa3db07e91c86f992c31b8e2335a760a9">vl_sift_get_octave_first</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get first octave.  <a href="#aa3db07e91c86f992c31b8e2335a760a9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a89bd76ab5c1e584ff8e46dfdc93ea748">vl_sift_get_octave_width</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current octave width.  <a href="#a89bd76ab5c1e584ff8e46dfdc93ea748"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a9769e8f6d84ec75804e873229526eb10">vl_sift_get_octave_height</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current octave height.  <a href="#a9769e8f6d84ec75804e873229526eb10"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a751c116352e72eed8a111e7c1e06a18e">vl_sift_get_nlevels</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get number of levels per octave.  <a href="#a751c116352e72eed8a111e7c1e06a18e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#aa45b8e7413384c7d6525f439e68856fe">vl_sift_get_nkeypoints</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get number of keypoints.  <a href="#aa45b8e7413384c7d6525f439e68856fe"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a08959e6a90c98bf397e3430e79a6ea9c">vl_sift_get_peak_thresh</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get peaks treashold.  <a href="#a08959e6a90c98bf397e3430e79a6ea9c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#adb5b0159af92e1ce1462ddaaaa55a747">vl_sift_get_edge_thresh</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get edges threshold.  <a href="#adb5b0159af92e1ce1462ddaaaa55a747"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#ad4b57c390ca004dc56b0b0b1abf0c7a9">vl_sift_get_norm_thresh</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get norm threshold.  <a href="#ad4b57c390ca004dc56b0b0b1abf0c7a9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#ae0272723812d5072619475d4787be78e">vl_sift_get_magnif</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the magnification factor.  <a href="#ae0272723812d5072619475d4787be78e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a76053a5e655b9577995fea0fbe429078">vl_sift_get_window_size</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the Gaussian window size.  <a href="#a76053a5e655b9577995fea0fbe429078"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="sift_8h.html#a7efac4fb08e4642f12ef439ac376a5cc">vl_sift_pix</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a400759060e87dc7a6264555b90b0a221">vl_sift_get_octave</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f, int s)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current octave data.  <a href="#a400759060e87dc7a6264555b90b0a221"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structVlSiftKeypoint.html">VlSiftKeypoint</a> const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a8d7878f102c5e09b2df06b3662ed9c6a">vl_sift_get_keypoints</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *f)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get keypoints.  <a href="#a8d7878f102c5e09b2df06b3662ed9c6a"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Set parameters</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#af69118a1c5d4d17bccac87d11fe8ce8f">vl_sift_set_peak_thresh</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *f, double t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set peaks threshold.  <a href="#af69118a1c5d4d17bccac87d11fe8ce8f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#ab7173b402b85de43ebf36fcabde77508">vl_sift_set_edge_thresh</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *f, double t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set edges threshold.  <a href="#ab7173b402b85de43ebf36fcabde77508"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a86703f33aad31638909acd9697f93115">vl_sift_set_norm_thresh</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *f, double t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set norm threshold.  <a href="#a86703f33aad31638909acd9697f93115"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#a595579dd7952807c074c5311a6500121">vl_sift_set_magnif</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *f, double m)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the magnification factor.  <a href="#a595579dd7952807c074c5311a6500121"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sift_8h.html#af5996cc6171c6e3c8810fb400abbad21">vl_sift_set_window_size</a> (<a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *f, double x)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the Gaussian window size.  <a href="#af5996cc6171c6e3c8810fb400abbad21"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><dl class="author"><dt><b>Author:</b></dt><dd>Andrea Vedaldi </dd></dl>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="a19140d86df12ff8c211c2728209de9b1"></a><!-- doxytag: member="sift.h::vl_sift_calc_keypoint_descriptor" ref="a19140d86df12ff8c211c2728209de9b1" args="(VlSiftFilt *f, vl_sift_pix *descr, VlSiftKeypoint const *k, double angle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vl_sift_calc_keypoint_descriptor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="sift_8h.html#a7efac4fb08e4642f12ef439ac376a5cc">vl_sift_pix</a> *&#160;</td>
          <td class="paramname"><em>descr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structVlSiftKeypoint.html">VlSiftKeypoint</a> const *&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle0</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
    <tr><td class="paramname">descr</td><td>SIFT descriptor (output) </td></tr>
    <tr><td class="paramname">k</td><td>keypoint. </td></tr>
    <tr><td class="paramname">angle0</td><td>keypoint direction.</td></tr>
  </table>
  </dd>
</dl>
<p>The function computes the SIFT descriptor of the keypoint <em>k</em> of orientation <em>angle0</em>. The function fills the buffer <em>descr</em> which must be large enough to hold the descriptor.</p>
<p>The function assumes that the keypoint is on the current octave. If not, it does not do anything. </p>

</div>
</div>
<a class="anchor" id="a2e409d464f81582dc3e839bf0fece66e"></a><!-- doxytag: member="sift.h::vl_sift_calc_keypoint_orientations" ref="a2e409d464f81582dc3e839bf0fece66e" args="(VlSiftFilt *f, double angles[4], VlSiftKeypoint const *k)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int vl_sift_calc_keypoint_orientations </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angles</em>[4], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structVlSiftKeypoint.html">VlSiftKeypoint</a> const *&#160;</td>
          <td class="paramname"><em>k</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
    <tr><td class="paramname">angles</td><td>orientations (output). </td></tr>
    <tr><td class="paramname">k</td><td>keypoint.</td></tr>
  </table>
  </dd>
</dl>
<p>The function computes the orientation(s) of the keypoint <em>k</em>. The function returns the number of orientations found (up to four). The orientations themselves are written to the vector <em>angles</em>.</p>
<dl class="remark"><dt><b>Remarks:</b></dt><dd>The function requires the keypoint octave <em>k-&gt;o</em> to be equal to the filter current octave <a class="el" href="sift_8h.html#a400759060e87dc7a6264555b90b0a221" title="Get current octave data.">vl_sift_get_octave</a>. If this is not the case, the function returns zero orientations.</dd>
<dd>
The function requires the keypoint scale level <code>k-&gt;s</code> to be in the range <code>s_min+1</code> and <code>s_max-2</code> (where usually <code>s_min=0</code> and <code>s_max=S+2</code>). If this is not the case, the function returns zero orientations.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of orientations found. </dd></dl>

</div>
</div>
<a class="anchor" id="a46d3e864618b4a940c2099b7c1f7b6a6"></a><!-- doxytag: member="sift.h::vl_sift_calc_raw_descriptor" ref="a46d3e864618b4a940c2099b7c1f7b6a6" args="(VlSiftFilt const *f, vl_sift_pix const *image, vl_sift_pix *descr, int widht, int height, double x, double y, double s, double angle0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vl_sift_calc_raw_descriptor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="sift_8h.html#a7efac4fb08e4642f12ef439ac376a5cc">vl_sift_pix</a> const *&#160;</td>
          <td class="paramname"><em>grad</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="sift_8h.html#a7efac4fb08e4642f12ef439ac376a5cc">vl_sift_pix</a> *&#160;</td>
          <td class="paramname"><em>descr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>sigma</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>angle0</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
    <tr><td class="paramname">grad</td><td>image gradients. </td></tr>
    <tr><td class="paramname">descr</td><td>SIFT descriptor (output). </td></tr>
    <tr><td class="paramname">width</td><td>image width. </td></tr>
    <tr><td class="paramname">height</td><td>image height. </td></tr>
    <tr><td class="paramname">x</td><td>keypoint x coordinate. </td></tr>
    <tr><td class="paramname">y</td><td>keypoint y coordinate. </td></tr>
    <tr><td class="paramname">sigma</td><td>keypoint scale. </td></tr>
    <tr><td class="paramname">angle0</td><td>keypoint orientation.</td></tr>
  </table>
  </dd>
</dl>
<p>The function runs the SIFT descriptor on raw data. Here <em>image</em> is a 2 x <em>width</em> x <em>height</em> array (by convention, the memory layout is a s such the first index is the fastest varying one). The first <em>width</em> x <em>height</em> layer of the array contains the gradient magnitude and the second the gradient angle (in radians, between 0 and <img class="formulaInl" alt="$ 2\pi $" src="form_343.png"/>). <em>x</em>, <em>y</em> and <em>sigma</em> give the keypoint center and scale respectively.</p>
<p>In order to be equivalent to a standard SIFT descriptor the image gradient must be computed at a smoothing level equal to the scale of the keypoint. In practice, the actual SIFT algorithm makes the following additional approximation, which influence the result:</p>
<ul>
<li>Scale is discretized in <code>S</code> levels.</li>
<li>The image is downsampled once for each octave (if you do this, the parameters <em>x</em>, <em>y</em> and <em>sigma</em> must be scaled too). </li>
</ul>

</div>
</div>
<a class="anchor" id="ab242293326626641411e7d7f43a109b2"></a><!-- doxytag: member="sift.h::vl_sift_delete" ref="ab242293326626641411e7d7f43a109b2" args="(VlSiftFilt *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vl_sift_delete </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter to delete.</td></tr>
  </table>
  </dd>
</dl>
<p>The function frees the resources allocated by <a class="el" href="sift_8c.html#adff66a155e30ed412bc8bbb97dfa2fae" title="Create a new SIFT filter.">vl_sift_new()</a>. </p>

</div>
</div>
<a class="anchor" id="a65c55820964f4f6609ca9ef1d547b2c4"></a><!-- doxytag: member="sift.h::vl_sift_detect" ref="a65c55820964f4f6609ca9ef1d547b2c4" args="(VlSiftFilt *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vl_sift_detect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The function detect keypoints in the current octave filling the internal keypoint buffer. Keypoints can be retrieved by <a class="el" href="sift_8h.html#a8d7878f102c5e09b2df06b3662ed9c6a" title="Get keypoints.">vl_sift_get_keypoints()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<p>Index GSS</p>
<p>Index matrix A</p>

</div>
</div>
<a class="anchor" id="adb5b0159af92e1ce1462ddaaaa55a747"></a><!-- doxytag: member="sift.h::vl_sift_get_edge_thresh" ref="adb5b0159af92e1ce1462ddaaaa55a747" args="(VlSiftFilt const *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double vl_sift_get_edge_thresh </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>threshold. </dd></dl>

</div>
</div>
<a class="anchor" id="a8d7878f102c5e09b2df06b3662ed9c6a"></a><!-- doxytag: member="sift.h::vl_sift_get_keypoints" ref="a8d7878f102c5e09b2df06b3662ed9c6a" args="(VlSiftFilt const *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structVlSiftKeypoint.html">VlSiftKeypoint</a> const * vl_sift_get_keypoints </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to the keypoints list. </dd></dl>

</div>
</div>
<a class="anchor" id="ae0272723812d5072619475d4787be78e"></a><!-- doxytag: member="sift.h::vl_sift_get_magnif" ref="ae0272723812d5072619475d4787be78e" args="(VlSiftFilt const *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double vl_sift_get_magnif </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>magnification factor. </dd></dl>

</div>
</div>
<a class="anchor" id="aa45b8e7413384c7d6525f439e68856fe"></a><!-- doxytag: member="sift.h::vl_sift_get_nkeypoints" ref="aa45b8e7413384c7d6525f439e68856fe" args="(VlSiftFilt const *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int vl_sift_get_nkeypoints </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of keypoints. </dd></dl>

</div>
</div>
<a class="anchor" id="a751c116352e72eed8a111e7c1e06a18e"></a><!-- doxytag: member="sift.h::vl_sift_get_nlevels" ref="a751c116352e72eed8a111e7c1e06a18e" args="(VlSiftFilt const *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int vl_sift_get_nlevels </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of leves per octave. </dd></dl>

</div>
</div>
<a class="anchor" id="a5e0cd96b3985635b82adabc3ce8b2242"></a><!-- doxytag: member="sift.h::vl_sift_get_noctaves" ref="a5e0cd96b3985635b82adabc3ce8b2242" args="(VlSiftFilt const *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int vl_sift_get_noctaves </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of octaves. </dd></dl>

</div>
</div>
<a class="anchor" id="ad4b57c390ca004dc56b0b0b1abf0c7a9"></a><!-- doxytag: member="sift.h::vl_sift_get_norm_thresh" ref="ad4b57c390ca004dc56b0b0b1abf0c7a9" args="(VlSiftFilt const *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double vl_sift_get_norm_thresh </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>threshold. </dd></dl>

</div>
</div>
<a class="anchor" id="a400759060e87dc7a6264555b90b0a221"></a><!-- doxytag: member="sift.h::vl_sift_get_octave" ref="a400759060e87dc7a6264555b90b0a221" args="(VlSiftFilt const *f, int s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="sift_8h.html#a7efac4fb08e4642f12ef439ac376a5cc">vl_sift_pix</a> * vl_sift_get_octave </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>s</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
    <tr><td class="paramname">s</td><td>level index.</td></tr>
  </table>
  </dd>
</dl>
<p>The level index <em>s</em> ranges in the interval <code>s_min = -1</code> and <code> s_max = S + 2</code>, where <code>S</code> is the number of levels per octave.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to the octave data for level <em>s</em>. </dd></dl>

</div>
</div>
<a class="anchor" id="aa3db07e91c86f992c31b8e2335a760a9"></a><!-- doxytag: member="sift.h::vl_sift_get_octave_first" ref="aa3db07e91c86f992c31b8e2335a760a9" args="(VlSiftFilt const *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int vl_sift_get_octave_first </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>------------------------------------------------------------------- </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>index of the first octave. </dd></dl>

</div>
</div>
<a class="anchor" id="a9769e8f6d84ec75804e873229526eb10"></a><!-- doxytag: member="sift.h::vl_sift_get_octave_height" ref="a9769e8f6d84ec75804e873229526eb10" args="(VlSiftFilt const *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int vl_sift_get_octave_height </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>current octave height. </dd></dl>

</div>
</div>
<a class="anchor" id="a70186e579c8eff1bcabf408f46169cad"></a><!-- doxytag: member="sift.h::vl_sift_get_octave_index" ref="a70186e579c8eff1bcabf408f46169cad" args="(VlSiftFilt const *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int vl_sift_get_octave_index </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>index of the current octave. </dd></dl>

</div>
</div>
<a class="anchor" id="a89bd76ab5c1e584ff8e46dfdc93ea748"></a><!-- doxytag: member="sift.h::vl_sift_get_octave_width" ref="a89bd76ab5c1e584ff8e46dfdc93ea748" args="(VlSiftFilt const *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int vl_sift_get_octave_width </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>current octave width. </dd></dl>

</div>
</div>
<a class="anchor" id="a08959e6a90c98bf397e3430e79a6ea9c"></a><!-- doxytag: member="sift.h::vl_sift_get_peak_thresh" ref="a08959e6a90c98bf397e3430e79a6ea9c" args="(VlSiftFilt const *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double vl_sift_get_peak_thresh </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>threshold ; </dd></dl>

</div>
</div>
<a class="anchor" id="a76053a5e655b9577995fea0fbe429078"></a><!-- doxytag: member="sift.h::vl_sift_get_window_size" ref="a76053a5e655b9577995fea0fbe429078" args="(VlSiftFilt const *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double vl_sift_get_window_size </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>standard deviation of the Gaussian window (in spatial bin units). </dd></dl>

</div>
</div>
<a class="anchor" id="a6f3fc8e38b6c0c520cb90b1a63ddc031"></a><!-- doxytag: member="sift.h::vl_sift_keypoint_init" ref="a6f3fc8e38b6c0c520cb90b1a63ddc031" args="(VlSiftFilt const *f, VlSiftKeypoint *k, double x, double y, double sigma)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vl_sift_keypoint_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> const *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structVlSiftKeypoint.html">VlSiftKeypoint</a> *&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>sigma</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
    <tr><td class="paramname">k</td><td>SIFT keypoint (output). </td></tr>
    <tr><td class="paramname">x</td><td>x coordinate of the keypoint center. </td></tr>
    <tr><td class="paramname">y</td><td>y coordinate of the keypoint center. </td></tr>
    <tr><td class="paramname">sigma</td><td>keypoint scale.</td></tr>
  </table>
  </dd>
</dl>
<p>The function initializes a keypoint structure <em>k</em> from the location <em>x</em> and <em>y</em> and the scale <em>sigma</em> of the keypoint. The keypoint structure maps the keypoint to an octave and scale level of the discretized Gaussian scale space, which is required for instance to compute the keypoint SIFT descriptor.</p>
<dl class="user"><dt><b>Algorithm</b></dt><dd></dd></dl>
<p>The formula linking the keypoint scale sigma to the octave and scale indexes is</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ \sigma(o,s) = \sigma_0 2^{o+s/S} \]" src="form_344.png"/>
</p>
<p>In addition to the scale index <em>s</em> (which can be fractional due to scale interpolation) a keypoint has an integer scale index <em>is</em> too (which is the index of the scale level where it was detected in the DoG scale space). We have the constraints (<a class="el" href="sift.html#sift-tech-detector">Detector</a> see also the "SIFT detector"):</p>
<ul>
<li><em>o</em> is integer in the range <img class="formulaInl" alt="$ [o_\mathrm{min}, o_{\mathrm{min}}+O-1] $" src="form_345.png"/>.</li>
<li><em>is</em> is integer in the range <img class="formulaInl" alt="$ [s_\mathrm{min}+1, s_\mathrm{max}-2] $" src="form_346.png"/>. This depends on how the scale is determined during detection, and must be so here because gradients are computed only for this range of scale levels and are required for the calculation of the SIFT descriptor.</li>
<li><img class="formulaInl" alt="$ |s - is| < 0.5 $" src="form_347.png"/> for detected keypoints in most cases due to the interpolation technique used during detection. However this is not necessary.</li>
</ul>
<p>Thus octave o represents scales <img class="formulaInl" alt="$ \{ \sigma(o, s) : s \in [s_\mathrm{min}+1-.5, s_\mathrm{max}-2+.5] \} $" src="form_348.png"/>. Note that some scales may be represented more than once. For each scale, we select the largest possible octave that contains it, i.e.</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ o(\sigma) = \max \{ o \in \mathbb{Z} : \sigma_0 2^{\frac{s_\mathrm{min}+1-.5}{S}} \leq \sigma \} = \mathrm{floor}\,\left[ \log_2(\sigma / \sigma_0) - \frac{s_\mathrm{min}+1-.5}{S}\right] \]" src="form_349.png"/>
</p>
<p>and then</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ s(\sigma) = S \left[\log_2(\sigma / \sigma_0) - o(\sigma)\right], \quad is(\sigma) = \mathrm{round}\,(s(\sigma)) \]" src="form_350.png"/>
</p>
<p>In practice, both <img class="formulaInl" alt="$ o(\sigma) $" src="form_351.png"/> and <img class="formulaInl" alt="$ is(\sigma) $" src="form_352.png"/> are clamped to their feasible range as determined by the SIFT filter parameters. </p>

</div>
</div>
<a class="anchor" id="adff66a155e30ed412bc8bbb97dfa2fae"></a><!-- doxytag: member="sift.h::vl_sift_new" ref="adff66a155e30ed412bc8bbb97dfa2fae" args="(int width, int height, int noctaves, int nlevels, int o_min)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a>* vl_sift_new </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>noctaves</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nlevels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>o_min</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">width</td><td>image width. </td></tr>
    <tr><td class="paramname">height</td><td>image height. </td></tr>
    <tr><td class="paramname">noctaves</td><td>number of octaves. </td></tr>
    <tr><td class="paramname">nlevels</td><td>number of levels per octave. </td></tr>
    <tr><td class="paramname">o_min</td><td>first octave index.</td></tr>
  </table>
  </dd>
</dl>
<p>The function allocates and returns a new SIFT filter for the specified image and scale space geometry.</p>
<p>Setting <em>O</em> to a negative value sets the number of octaves to the maximum possible value depending on the size of the image.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the new SIFT filter. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="sift_8c.html#ab242293326626641411e7d7f43a109b2" title="Delete SIFT filter.">vl_sift_delete()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a97cca9a09efaadc9dd0671912b9d5e05"></a><!-- doxytag: member="sift.h::vl_sift_process_first_octave" ref="a97cca9a09efaadc9dd0671912b9d5e05" args="(VlSiftFilt *f, vl_sift_pix const *im)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int vl_sift_process_first_octave </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="sift_8h.html#a7efac4fb08e4642f12ef439ac376a5cc">vl_sift_pix</a> const *&#160;</td>
          <td class="paramname"><em>im</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
    <tr><td class="paramname">im</td><td>image data.</td></tr>
  </table>
  </dd>
</dl>
<p>The function starts processing a new image by computing its Gaussian scale space at the lower octave. It also empties the internal keypoint buffer.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>error code. The function returns <a class="el" href="generic_8h.html#a67cc69e40d7af2aec137b36e53422982">VL_ERR_EOF</a> if there are no more octaves to process.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="sift_8c.html#a610cab1a3bf7d38e389afda9037f14da" title="Process next octave.">vl_sift_process_next_octave()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a610cab1a3bf7d38e389afda9037f14da"></a><!-- doxytag: member="sift.h::vl_sift_process_next_octave" ref="a610cab1a3bf7d38e389afda9037f14da" args="(VlSiftFilt *f)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int vl_sift_process_next_octave </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter.</td></tr>
  </table>
  </dd>
</dl>
<p>The function computes the next octave of the Gaussian scale space. Notice that this clears the record of any feature detected in the previous octave.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>error code. The function returns the error <a class="el" href="generic_8h.html#a67cc69e40d7af2aec137b36e53422982">VL_ERR_EOF</a> when there are no more octaves to process.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="sift_8c.html#a97cca9a09efaadc9dd0671912b9d5e05" title="Start processing a new image.">vl_sift_process_first_octave()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="ab7173b402b85de43ebf36fcabde77508"></a><!-- doxytag: member="sift.h::vl_sift_set_edge_thresh" ref="ab7173b402b85de43ebf36fcabde77508" args="(VlSiftFilt *f, double t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vl_sift_set_edge_thresh </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
    <tr><td class="paramname">t</td><td>threshold. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a595579dd7952807c074c5311a6500121"></a><!-- doxytag: member="sift.h::vl_sift_set_magnif" ref="a595579dd7952807c074c5311a6500121" args="(VlSiftFilt *f, double m)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vl_sift_set_magnif </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>m</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
    <tr><td class="paramname">m</td><td>magnification factor. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a86703f33aad31638909acd9697f93115"></a><!-- doxytag: member="sift.h::vl_sift_set_norm_thresh" ref="a86703f33aad31638909acd9697f93115" args="(VlSiftFilt *f, double t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vl_sift_set_norm_thresh </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
    <tr><td class="paramname">t</td><td>threshold. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af69118a1c5d4d17bccac87d11fe8ce8f"></a><!-- doxytag: member="sift.h::vl_sift_set_peak_thresh" ref="af69118a1c5d4d17bccac87d11fe8ce8f" args="(VlSiftFilt *f, double t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vl_sift_set_peak_thresh </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
    <tr><td class="paramname">t</td><td>threshold. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af5996cc6171c6e3c8810fb400abbad21"></a><!-- doxytag: member="sift.h::vl_sift_set_window_size" ref="af5996cc6171c6e3c8810fb400abbad21" args="(VlSiftFilt *f, double x)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vl_sift_set_window_size </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structVlSiftFilt.html">VlSiftFilt</a> *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>SIFT filter. </td></tr>
    <tr><td class="paramname">x</td><td>Gaussian window size (in units of spatial bin).</td></tr>
  </table>
  </dd>
</dl>
<p>This is the parameter <img class="formulaInl" alt="$ \hat \sigma_{\text{win}} $" src="form_353.png"/> of the standard SIFT descriptor <a class="el" href="sift.html#sift-tech-descriptor-std">Standard SIFT descriptor</a>. </p>

</div>
</div>
</div>
     <!-- Doc Here -->
    </div>
   
   </div>
   <div class="clear">&nbsp;</div>
  </div> <!-- pagebody -->
  <div id="footer">
   &copy; 2007-12 Andrea Vedaldi and Brian Fulkerson
  </div> <!-- footer -->

  <!-- Google Analytics Begins -->
  <script xml:space="preserve" type="text/javascript">
   //<![CDATA[
    var localre = /vlfeat.org/;
    if(document.location.host.search(localre) != -1)
    {
   var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
   document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
   }
   //]]>
  </script>
  <script xml:space="preserve" type="text/javascript">
    //<![CDATA[
    var localre = /vlfeat.org/;
    if(document.location.host.search(localre) != -1)
    {

   try {
   var pageTracker = _gat._getTracker("UA-4936091-2");
   pageTracker._trackPageview();
   } catch(err) {}

   }
   //]]>
  </script>
  <!-- Google Analytics Ends -->
 </body>
</html>

 
